package com.bawei.module_advice.http

import com.bawei.lib_net.NetModule
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Qualifier
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object AdviceNetModule {

    @Provides
    @Singleton
    @CommonAdviceApi
    fun provideAdviceApi(@NetModule.CommonRetrofit retrofit: Retrofit):AdviceApi{
        return retrofit.create(AdviceApi::class.java)
    }
    //1
    @Qualifier
    @Retention(AnnotationRetention.RUNTIME)
    annotation class CommonAdviceApi

}